package com.it.zhangjun.effective;

/**
 * TODO
 *
 * @author jun.zhang6
 * @date 2021/4/12
 */
public class GenericTest {

    public class Generic<T> {
        private T key;

        public Generic(T key) {
            this.key = key;
        }

        public T getKey() {
            return key;
        }

    }

    public <T> T showKeyName(Generic<T> container) {
        System.out.println("container key :" + container.getKey());
        T test = container.getKey();
        return test;
    }
}
